.class Lcom/burstly/lib/component/networkcomponent/greystripe/GreystripeAdaptor$GSListener;
.super Ljava/lang/Object;
.source "GreystripeAdaptor.java"

# interfaces
.implements Lcom/greystripe/sdk/GSAdListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/burstly/lib/component/networkcomponent/greystripe/GreystripeAdaptor;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0xa
    name = "GSListener"
.end annotation


# instance fields
.field private final mAdaptor:Ljava/lang/ref/Reference;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/lang/ref/Reference",
            "<",
            "Lcom/burstly/lib/component/networkcomponent/greystripe/GreystripeAdaptor;",
            ">;"
        }
    .end annotation
.end field


# direct methods
.method constructor <init>(Lcom/burstly/lib/component/networkcomponent/greystripe/GreystripeAdaptor;)V
    .locals 1
    .parameter "adaptor"

    .prologue
    .line 71
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 72
    new-instance v0, Ljava/lang/ref/WeakReference;

    invoke-direct {v0, p1}, Ljava/lang/ref/WeakReference;-><init>(Ljava/lang/Object;)V

    iput-object v0, p0, Lcom/burstly/lib/component/networkcomponent/greystripe/GreystripeAdaptor$GSListener;->mAdaptor:Ljava/lang/ref/Reference;

    .line 73
    return-void
.end method


# virtual methods
.method public onAdClickthrough(Lcom/greystripe/sdk/GSAd;)V
    .locals 4
    .parameter "view"

    .prologue
    .line 77
    iget-object v2, p0, Lcom/burstly/lib/component/networkcomponent/greystripe/GreystripeAdaptor$GSListener;->mAdaptor:Ljava/lang/ref/Reference;

    invoke-virtual {v2}, Ljava/lang/ref/Reference;->get()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/burstly/lib/component/networkcomponent/greystripe/GreystripeAdaptor;

    .line 78
    .local v0, adaptor:Lcom/burstly/lib/component/networkcomponent/greystripe/GreystripeAdaptor;
    if-eqz v0, :cond_0

    invoke-virtual {v0}, Lcom/burstly/lib/component/networkcomponent/greystripe/GreystripeAdaptor;->isStopped()Z

    move-result v2

    if-nez v2, :cond_0

    .line 79
    instance-of v1, p1, Lcom/greystripe/sdk/GSFullscreenAd;

    .line 80
    .local v1, isInterstitial:Z
    invoke-virtual {v0}, Lcom/burstly/lib/component/networkcomponent/greystripe/GreystripeAdaptor;->getAdaptorListener()Lcom/burstly/lib/component/IBurstlyAdaptorListener;

    move-result-object v2

    const-string v3, "greystripe"

    invoke-interface {v2, v3, v1}, Lcom/burstly/lib/component/IBurstlyAdaptorListener;->adWasClicked(Ljava/lang/String;Z)V

    .line 82
    .end local v1           #isInterstitial:Z
    :cond_0
    return-void
.end method

.method public onAdCollapse(Lcom/greystripe/sdk/GSAd;)V
    .locals 3
    .parameter "view"

    .prologue
    .line 127
    iget-object v1, p0, Lcom/burstly/lib/component/networkcomponent/greystripe/GreystripeAdaptor$GSListener;->mAdaptor:Ljava/lang/ref/Reference;

    invoke-virtual {v1}, Ljava/lang/ref/Reference;->get()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/burstly/lib/component/networkcomponent/greystripe/GreystripeAdaptor;

    .line 128
    .local v0, adaptor:Lcom/burstly/lib/component/networkcomponent/greystripe/GreystripeAdaptor;
    if-eqz v0, :cond_0

    invoke-virtual {v0}, Lcom/burstly/lib/component/networkcomponent/greystripe/GreystripeAdaptor;->isStopped()Z

    move-result v1

    if-nez v1, :cond_0

    .line 129
    invoke-virtual {v0}, Lcom/burstly/lib/component/networkcomponent/greystripe/GreystripeAdaptor;->getAdaptorListener()Lcom/burstly/lib/component/IBurstlyAdaptorListener;

    move-result-object v1

    const-string v2, "greystripe"

    invoke-interface {v1, v2}, Lcom/burstly/lib/component/IBurstlyAdaptorListener;->onCollapse(Ljava/lang/String;)V

    .line 131
    :cond_0
    return-void
.end method

.method public onAdDismissal(Lcom/greystripe/sdk/GSAd;)V
    .locals 3
    .parameter "view"

    .prologue
    .line 86
    instance-of v1, p1, Lcom/greystripe/sdk/GSFullscreenAd;

    if-eqz v1, :cond_0

    .line 87
    iget-object v1, p0, Lcom/burstly/lib/component/networkcomponent/greystripe/GreystripeAdaptor$GSListener;->mAdaptor:Ljava/lang/ref/Reference;

    invoke-virtual {v1}, Ljava/lang/ref/Reference;->get()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/burstly/lib/component/networkcomponent/greystripe/GreystripeAdaptor;

    .line 88
    .local v0, adaptor:Lcom/burstly/lib/component/networkcomponent/greystripe/GreystripeAdaptor;
    if-eqz v0, :cond_0

    invoke-virtual {v0}, Lcom/burstly/lib/component/networkcomponent/greystripe/GreystripeAdaptor;->isStopped()Z

    move-result v1

    if-nez v1, :cond_0

    .line 89
    invoke-virtual {v0}, Lcom/burstly/lib/component/networkcomponent/greystripe/GreystripeAdaptor;->getAdaptorListener()Lcom/burstly/lib/component/IBurstlyAdaptorListener;

    move-result-object v1

    sget-object v2, Lcom/burstly/lib/component/networkcomponent/greystripe/GreystripeAdaptor;->FULLSCREEN_INFO:Lcom/burstly/lib/component/IBurstlyAdaptorListener$FullscreenInfo;

    invoke-interface {v1, v2}, Lcom/burstly/lib/component/IBurstlyAdaptorListener;->dismissedFullscreen(Lcom/burstly/lib/component/IBurstlyAdaptorListener$FullscreenInfo;)V

    .line 92
    .end local v0           #adaptor:Lcom/burstly/lib/component/networkcomponent/greystripe/GreystripeAdaptor;
    :cond_0
    return-void
.end method

.method public onAdExpansion(Lcom/greystripe/sdk/GSAd;)V
    .locals 4
    .parameter "view"

    .prologue
    .line 119
    iget-object v1, p0, Lcom/burstly/lib/component/networkcomponent/greystripe/GreystripeAdaptor$GSListener;->mAdaptor:Ljava/lang/ref/Reference;

    invoke-virtual {v1}, Ljava/lang/ref/Reference;->get()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/burstly/lib/component/networkcomponent/greystripe/GreystripeAdaptor;

    .line 120
    .local v0, adaptor:Lcom/burstly/lib/component/networkcomponent/greystripe/GreystripeAdaptor;
    if-eqz v0, :cond_0

    invoke-virtual {v0}, Lcom/burstly/lib/component/networkcomponent/greystripe/GreystripeAdaptor;->isStopped()Z

    move-result v1

    if-nez v1, :cond_0

    .line 121
    invoke-virtual {v0}, Lcom/burstly/lib/component/networkcomponent/greystripe/GreystripeAdaptor;->getAdaptorListener()Lcom/burstly/lib/component/IBurstlyAdaptorListener;

    move-result-object v1

    const-string v2, "greystripe"

    const/4 v3, 0x1

    invoke-interface {v1, v2, v3}, Lcom/burstly/lib/component/IBurstlyAdaptorListener;->onExpand(Ljava/lang/String;Z)V

    .line 123
    :cond_0
    return-void
.end method

.method public onFailedToFetchAd(Lcom/greystripe/sdk/GSAd;Lcom/greystripe/sdk/GSAdErrorCode;)V
    .locals 6
    .parameter "view"
    .parameter "error"

    .prologue
    .line 96
    iget-object v2, p0, Lcom/burstly/lib/component/networkcomponent/greystripe/GreystripeAdaptor$GSListener;->mAdaptor:Ljava/lang/ref/Reference;

    invoke-virtual {v2}, Ljava/lang/ref/Reference;->get()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/burstly/lib/component/networkcomponent/greystripe/GreystripeAdaptor;

    .line 97
    .local v0, adaptor:Lcom/burstly/lib/component/networkcomponent/greystripe/GreystripeAdaptor;
    if-eqz v0, :cond_0

    invoke-virtual {v0}, Lcom/burstly/lib/component/networkcomponent/greystripe/GreystripeAdaptor;->isStopped()Z

    move-result v2

    if-nez v2, :cond_0

    .line 98
    instance-of v1, p1, Lcom/greystripe/sdk/GSFullscreenAd;

    .line 99
    .local v1, isInterstitial:Z
    invoke-static {}, Lcom/burstly/lib/component/networkcomponent/greystripe/GreystripeAdaptor;->access$100()Lcom/burstly/lib/util/LoggerExt;

    move-result-object v2

    #getter for: Lcom/burstly/lib/component/networkcomponent/greystripe/GreystripeAdaptor;->mTag:Ljava/lang/String;
    invoke-static {v0}, Lcom/burstly/lib/component/networkcomponent/greystripe/GreystripeAdaptor;->access$000(Lcom/burstly/lib/component/networkcomponent/greystripe/GreystripeAdaptor;)Ljava/lang/String;

    move-result-object v3

    const-string v4, "Failed to receive Greystripe ad..."

    const/4 v5, 0x0

    new-array v5, v5, [Ljava/lang/Object;

    invoke-virtual {v2, v3, v4, v5}, Lcom/burstly/lib/util/LoggerExt;->logInfo(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    .line 100
    invoke-virtual {v0}, Lcom/burstly/lib/component/networkcomponent/greystripe/GreystripeAdaptor;->getAdaptorListener()Lcom/burstly/lib/component/IBurstlyAdaptorListener;

    move-result-object v2

    const-string v3, "greystripe"

    invoke-virtual {p2}, Lcom/greystripe/sdk/GSAdErrorCode;->name()Ljava/lang/String;

    move-result-object v4

    invoke-interface {v2, v3, v1, v4}, Lcom/burstly/lib/component/IBurstlyAdaptorListener;->failedToLoad(Ljava/lang/String;ZLjava/lang/String;)V

    .line 102
    .end local v1           #isInterstitial:Z
    :cond_0
    return-void
.end method

.method public onFetchedAd(Lcom/greystripe/sdk/GSAd;)V
    .locals 4
    .parameter "view"

    .prologue
    .line 106
    iget-object v2, p0, Lcom/burstly/lib/component/networkcomponent/greystripe/GreystripeAdaptor$GSListener;->mAdaptor:Ljava/lang/ref/Reference;

    invoke-virtual {v2}, Ljava/lang/ref/Reference;->get()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/burstly/lib/component/networkcomponent/greystripe/GreystripeAdaptor;

    .line 107
    .local v0, adaptor:Lcom/burstly/lib/component/networkcomponent/greystripe/GreystripeAdaptor;
    if-eqz v0, :cond_0

    invoke-virtual {v0}, Lcom/burstly/lib/component/networkcomponent/greystripe/GreystripeAdaptor;->isStopped()Z

    move-result v2

    if-nez v2, :cond_0

    .line 108
    instance-of v1, p1, Lcom/greystripe/sdk/GSFullscreenAd;

    .line 109
    .local v1, isInterstitial:Z
    invoke-virtual {v0}, Lcom/burstly/lib/component/networkcomponent/greystripe/GreystripeAdaptor;->getAdaptorListener()Lcom/burstly/lib/component/IBurstlyAdaptorListener;

    move-result-object v2

    const-string v3, "greystripe"

    invoke-interface {v2, v3, v1}, Lcom/burstly/lib/component/IBurstlyAdaptorListener;->didLoad(Ljava/lang/String;Z)V

    .line 110
    #getter for: Lcom/burstly/lib/component/networkcomponent/greystripe/GreystripeAdaptor;->mPrecachedInterstitial:Lcom/greystripe/sdk/GSFullscreenAd;
    invoke-static {v0}, Lcom/burstly/lib/component/networkcomponent/greystripe/GreystripeAdaptor;->access$200(Lcom/burstly/lib/component/networkcomponent/greystripe/GreystripeAdaptor;)Lcom/greystripe/sdk/GSFullscreenAd;

    move-result-object v2

    if-nez v2, :cond_0

    if-eqz v1, :cond_0

    .line 111
    check-cast p1, Lcom/greystripe/sdk/GSFullscreenAd;

    .end local p1
    invoke-virtual {p1}, Lcom/greystripe/sdk/GSFullscreenAd;->display()V

    .line 112
    invoke-virtual {v0}, Lcom/burstly/lib/component/networkcomponent/greystripe/GreystripeAdaptor;->getAdaptorListener()Lcom/burstly/lib/component/IBurstlyAdaptorListener;

    move-result-object v2

    sget-object v3, Lcom/burstly/lib/component/networkcomponent/greystripe/GreystripeAdaptor;->FULLSCREEN_INFO:Lcom/burstly/lib/component/IBurstlyAdaptorListener$FullscreenInfo;

    invoke-interface {v2, v3}, Lcom/burstly/lib/component/IBurstlyAdaptorListener;->shownFullscreen(Lcom/burstly/lib/component/IBurstlyAdaptorListener$FullscreenInfo;)V

    .line 115
    .end local v1           #isInterstitial:Z
    :cond_0
    return-void
.end method
